%% 参数设置
function main_Actan(I, data_filepath, filename, Area)
    Phi = atan2(I{4,1} - I{2,1}, I{1,1} - I{3,1});
    save([data_filepath, filename,'-Phi.mat'],'Phi');
    standard_unwarpphase = load('.\64-unwarpphase.mat');standard_unwarpphase = standard_unwarpphase.phi_c2;
    %解相位
    MASK = ones(size(Phi));
    MASK(isnan(Phi)) = 0;
    unWarpPhase = GoldsteinUnwrap2D_r1(Phi, MASK);
    save([data_filepath, filename,'-unWarpPhase.mat'],'unWarpPhase');
    epslion = (unWarpPhase - standard_unwarpphase);
    unWarpPhase1 = unWarpPhase - mean(epslion(:),"omitnan");
    %由于空域展开的绝对相位起始点会随着位置变化而变化，故利用12frame对齐绝对相位
    % ＲＭＳＥ

    RMSE_unwarpphase = fun_RMSE(unWarpPhase1, standard_unwarpphase);
    save([data_filepath, filename,'-RMSE_unwarpphase.mat'],'RMSE_unwarpphase');
    save([data_filepath, filename,'-unWarpPhase1.mat'],'unWarpPhase1');
    stdImg = nan(3648,5472);
    unWarpPhase1 = imgaussfilt(unWarpPhase1,[3 3]);
    stdImg(Area(1):Area(2),Area(3):Area(4)) = unWarpPhase1;
    ptCloud = Reconstruct(stdImg);
    str = [data_filepath,filename,'.ply'];
    pcwrite(ptCloud,str);
    fprintf('----------保存成功--------- \n');
end
